import http from "@/utils/vmeitime-http/index.js";
export const getOrderList = (data) => http.get("/applet_shop/user_order/list", data);
// 采购单确认
export const confirmOrder = (data) => http.post("/applet_shop/user_order/confirm_submit", data);
// 采购单确认收货
export const confirmReceipt = (data) => http.post("/applet_shop/user_order/receive", data);
// 采购单取消
export const cancelOrder = (data) => http.post("/applet_shop/user_order/cancel", data);

// 获取供应商列表
export const getSupplierList = (data) => http.get("/applet_shop/user_order/supplier_list", data);
// 获取品牌列表
export const getBrandList = (data) => http.get("/applet_shop/user_order/supplier_brand", data);
// 获取商品列表
export const getGoodsList = (data) => http.get("/applet_shop/user_order/goods_list", data);
// 获取商品规格列表
export const getGoodsSpecList = (data) => http.get("/applet_shop/user_order/goods_spec", data);

// 采购单新增
export const addSupplierOrder = (data) => http.post("/applet_shop/user_order/add", data);
// 采购单详情
export const getSupplierOrderDetail = (data) => http.get("/applet_shop/user_order/info", data);

// 待客下单分享获取的采购单详情
export const getShareOrderDetail = (data) => http.get("/applet_shop/user_order/confirm_info", data);

// 获取详细订单
export const getKeyforOrder = (data) => http.get("/applet_shop/user_order/list", data);





// 来着C端的用户订单
export const getOrderListForc = (data) => http.get("/applet_shop/owner/order/list", data);
export const cancelOrderForc = (data) => http.post("/applet_shop/owner/order/cancel", data);
export const sendGoodsApiForc = (data) => http.post("/applet_shop/owner/order/deliverGoods", data);
export const getOrderInfoForc = (data) => http.get("/applet_shop/owner/order/info", data);
export const editOrderPriceForc = (data) => http.post("/applet_shop/owner/order/price", data); // 编辑订单内的价格
export const setPaymentOrderForc = (data) => http.post("/applet_shop/owner/order/settlement", data); // 结款


//c端 代客下单
export const proxySetOrderForc = (data) => http.post('/applet_shop/owner/order/placeOrder', data)

// 获取所有C端用户 1是客户 2是师傅
export  const  getAllUserForc = (data) => http.get('/applet_shop/owner/user/userList', data)

// 获取商品列表给C端用户选择
export const getGoodsListForc = (data) => http.get('/applet_shop/shop_goods/list', data)
// 获取规格列表给C端用户选择
export const getGoodsSpecListForc = (data) => http.get('/applet_shop/shop_goods/getShopGoodsSku', data)

// 创建短链接分享新小程序
export const getUserShareLink = (data) => http.get('/applet_shop/wx/getSchemeCode', data)